<?php

use think\facade\Route;

$domain = ['Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, token, sign'];

//云耕科技-商品分类
Route::group('tillageProductCate', function () {
    Route::get('/index', 'tillageProductCate/index');
});

//云耕科技-商品
Route::group('tillageProduct', function () {
    Route::get('/getList', 'tillageProduct/getList');
    Route::get('/details', 'tillageProduct/details');
    Route::get('/getSpecData', 'tillageProduct/getSpecData');
    Route::get('/getSpecValue', 'tillageProduct/getSpecValue');
    Route::post('/submit', 'tillageProduct/submit')->middleware('verify');
});

//云耕科技-购物车
Route::group('tillageCart', function () {
    Route::get('/index', 'tillageCart/index');
    Route::post('/add', 'tillageCart/add');
    Route::post('/edit', 'tillageCart/edit');
    Route::post('/submit', 'tillageCart/submit');
})->middleware('verify');

//云耕科技-订单相关
Route::group('tillageOrder', function () {
    Route::get('/index', 'tillageOrder/index');
    Route::get('/payment', 'tillageOrder/payment');
    Route::get('/details', 'tillageOrder/details');
    Route::get('/getList', 'tillageOrder/getList');
    Route::post('/submit', 'tillageOrder/submit');
    Route::post('/confirmPayment', 'tillageOrder/confirmPayment');
    Route::post('/edit', 'tillageOrder/edit');

    //退款退货
    Route::get('/refundFront', 'tillageOrder/refundFront');
    Route::post('/refundSave', 'tillageOrder/refundSave');
    Route::get('/getMyRefundOrder', 'tillageOrder/getMyRefundOrder');
    Route::get('/getMyRefundOrderInfo/:id', 'tillageOrder/getMyRefundOrderInfo');
    //Route::get('/getExpress', 'tillageOrder/getExpress');
    Route::post('/editRefundOrder', 'tillageOrder/editRefundOrder');
    Route::get('/orderExp', 'tillageOrder/orderExp');
    Route::get('/expInfo', 'tillageOrder/expInfo');
})->middleware('verify');

//云耕科技-提现相关
Route::group('tillageDraw', function () {
    Route::get('/rule', 'tillageDraw/rule');
    Route::get('/index', 'tillageDraw/index');
    Route::post('/save', 'tillageDraw/save');
})->middleware('verify');

//云耕科技-转账相关
Route::group('tillageTransfer', function () {
    Route::get('/rule', 'tillageTransfer/rule');
    Route::get('/index', 'tillageTransfer/index');
    Route::get('/verify', 'tillageTransfer/verify');
    Route::post('/save', 'tillageTransfer/save');
})->middleware('verify');

